package collectionDemo.linkedListDemo;

import utils.PrintUtil;

import java.util.LinkedList;
import java.util.List;

/**
 * @Author: Jie
 * @Date: 2019/5/28 14:57
 * @Function :
 */
public class removeDemo {
    public static void main(String[] args) {
        List<String> mList = new LinkedList<>();
        for (int i = 0; i < 200; i++) {
            mList.add(String.valueOf(i));
        }
        System.out.println(" init "+mList.size());
        for (int i = 100; i >20; i--) {
            mList.remove(i);
        }
        System.out.println(mList.size());
        PrintUtil.print(mList);
    }
}
